package itdep.ui.pages.common.profile;

import ga.domain.services.GenericEntityService;
import ga.tapestry.StateConstants;
import ga.tapestry.commonlib.base.pages.EntityDetailsPage;
import itdep.domain.profile.Profile;
import itdep.services.profile.ProfileService;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.ioc.annotations.Inject;

/**
 * @author Ivan Khalopik
 * @version $Revision: 58 $ $Date: 2010-07-08 23:36:22 +0000 (Thu, 08 Jul 2010) $
 */
public class ProfileDetails extends EntityDetailsPage<Profile> {

	@Inject
	private ProfileService profileService;
	
	@InjectPage
	private ProfileList profileList;

	@InjectPage
	private ProfileAttachPicture profileAttachPicture;

	@Override
	protected Object getList() {
		return profileList;
	}

	@Override
	protected ProfileService getEntityService() {
		return profileService;
	}

	protected Object onAttach() {
		profileAttachPicture.setProfileId(getRecordId());
		return profileAttachPicture;
	}
}
